//
//  EpointConsts.h
//  EpointFrame5
//
//  Created by 李亚春 on 13-12-17.
//  Copyright (c) 2013年 Epoint. All rights reserved.
//

#import <Foundation/Foundation.h>
//微门户
#define EpointWS_AppKey @"epointoa"
#define EpointWS_AppSecret @"11111"

//上海虹口
//#define EpointWS_AppKey @"epointshhk"
//#define EpointWS_AppSecret @"Shhk2014Qwe*#"

#define Epoint_User_LoginId     @"Epoint_User_LoginId"
#define Epoint_User_Psw         @"Epoint_User_Psw"
#define Epoint_User_UserGuid    @"Epoint_User_UserGuid"
#define Epoint_User_DisplayName @"Epoint_User_DisplayName"
#define Epoint_User_MainConfig  @"Epoint_User_MainConfig"
#define Epoint_User_BaseOuGuid  @"Epoint_User_BaseOuGuid"
#define Epoint_OAVesion         @"Epoint_OAVesion"

//模块配置地址
#define Epoint_User_MainConfig_URL @"Epoint_User_MainConfig_URL"

//主题颜色配置项
#define Epoint_User_ThemeColor @"Epoint_User_ThemeColor"

//iOS消息推送Token
#define Epoint_User_DevicePushToken @"Epoint_User_DevicePushToken"

//移动OA接口地址
#define Epoint_MobileOAWebService_URL @"Epoint_MobileOAWebService_URL"

//手写签批标志 允许：true  不允许:false
#define Epoint_NeedHandWrite_Flag @"Epoint_NeedHandWrite_Flag"
//手写签批 笔迹内容
#define Epoint_NeedHandWrite_NodesString @"Epoint_NeedHandWrite_NodesString"
//手写签批 文件内容
#define Epoint_NeedHandWrite_NSData @"Epoint_NeedHandWrite_NSData"

#define Epoint_iOSPushType @"Epoint_iOSPushType"

//数据同步日期
#define Epoint_Syn_Date @"Epoint_Syn_Date"

//签到记录
#define Epoint_KaoQin @"Epoint_KaoQin"

#define CurrentDeviceISiPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IsiOS7Over ([UIDevice currentDevice].systemVersion.floatValue >= 7.0)
#define IsiOS8Over ([UIDevice currentDevice].systemVersion.floatValue >= 8.0)

#define StatusBarHeight (IsiOS8Over ? ([UIApplication sharedApplication].statusBarFrame.size.height) : (CurrentDeviceISiPad?([UIApplication sharedApplication].statusBarFrame.size.width):([UIApplication sharedApplication].statusBarFrame.size.height)))

#define NavigationBarHeight 44
#define BottomBarHeight 49

#define SystemTakeHeight (StatusBarHeight + NavigationBarHeight)
#define UIViewRemain (AppHeight-SystemTakeHeight)


#define UIScreenWidth ([UIScreen mainScreen].bounds.size.width)
#define UIScreenHeight ([UIScreen mainScreen].bounds.size.height)


#define DeviceTrueWidth ([UIApplication sharedApplication].statusBarFrame.size.width)
#define DeviceTrueHeight ([UIApplication sharedApplication].statusBarFrame.size.height)

#define AppDeviceWidth UIScreenWidth
#define AppWidth (IsiOS8Over ? (CurrentDeviceISiPad ? UIScreenWidth-PAD_LEFT_NAV_WIDTH : UIScreenWidth) : (CurrentDeviceISiPad ? UIScreenHeight-PAD_LEFT_NAV_WIDTH : UIScreenWidth))
#define AppHeight  (IsiOS8Over ? UIScreenHeight : (CurrentDeviceISiPad ? UIScreenWidth : UIScreenHeight))

#define ISFourInch (UIScreenHeight == 568)

#define AccessoryWidth 40
#define isReadWidth 25

#define InboxType @"100000"
#define OutboxType @"100001"
#define TaskMail_Type @"1"


#define MailCtrlColorGray COLOR(217, 217, 217)
#define MailCtrlColorBlue COLOR(0, 122, 255)
//#define MainTinColor COLOR(54, 147, 190) //0 122, 255
#define MainTinColor COLOR(0, 122, 255)

#define BigFileCantBeDownloaded @"大附件无法下载！"
#define AreYouSureToDeleteThisMaill @"你确定要删除这封邮件吗？"

#define FailToLoadNetWorkPleaseCheckTheSetting @"网络请求失败，请检查网络配置！"

#define NSLogBOOL(boolStr, bool) (NSLog(@"%@:%@", boolStr, bool?@"YES":@"NO"))
#define NSStringInt(intNum) ([NSString stringWithFormat:@"%d", intNum])
#define ZWBJ_DOC_FILEPATH @"ZWBJ_DOC_FILEPATH" //正文编辑本地文件路径

//只在调试模式输出日志
#if DEBUG
#define debuglog(format, ...)   NSLog(format, __VA_ARGS__)
#else
#define debuglog(format, ...)
#endif


typedef enum {
    DontPull,
    PullUpRefresh,
    PullDownRefresh
} PullStyle;

@interface EpointConsts : NSObject

//公司OA地址
#define EpointOAWebServiceUrl @"http://oa.epoint.com.cn/WebServiceManage/EMWebService.asmx"

@end
